package com.timing.finder.framework;

import lombok.Getter;

/**
 * 配置
 *
 * @author JingGe(* ^ ▽ ^ *)
 * @date 2023-03-03 14:21
 * @email 1158055613@qq.com
 */
@Getter
public class TimingFinderConfig {
    String applicationName;

    Boolean enableLoader;

    String cronExpression;

    Integer repeatCount;

    Boolean isCacheClustered;

    Boolean clearBeforeRun;

    Boolean testAfterWhenError;

    Boolean enableConcurrency;

    Integer concurrencyThreadCount;

    String lowPowerCron;

    Integer lowPowerThreadCount;

    Integer batchSize;

    Double maximumExecutionTime;

    Long maximumExecutionSize;

    Long initialSize;

    Boolean enableAlloc;

    Integer expiringTime;

    Long starID;

    Long endID;

    Long defaultStartOffset;

    Long defaultUnitOffset;

    Long bloomExpectedInsertions;

    Double bloomMisjudgmentRate;

    public static TimingFinderConfig getInstance(TimingFinderConfigFactory finderConfigFactory, String applicationName) {
        return finderConfigFactory.create(applicationName);
    }

    public void setStarID(Long starID) {
        this.starID = starID;
    }

    TimingFinderConfig() {
    }
}
